home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / Kubuntu 8.10 / kubuntu-8.10-desktop-i386.iso / casper / filesystem.squashfs / usr / share / doc / pnm2ppa / README.security < prev    next >
Text File  |  2001-08-27  |  4KB  |  98 lines

  1. These notes  are for the guidance of  distributions that include  pnm2ppa:
  2. ---------------------------------------------------------------------
  3.  
  4. Notes on secure installation of pnm2ppa.
  5.  
  6. What pnm2ppa does:
  7.  
  8. 1.  It attempts to open and read  a configuration file
  9.     "/etc/pnm2ppa.conf", and then any additional configuration
  10.     files with paths specified by the -f command line option.
  11.  
  12.     These paths are checked to be shorter than MAXPATHLEN before
  13.     they are used, otherwise pnm2ppa terminates.
  14.  
  15.     GNU getopt() is used to process options.
  16.  
  17. 2.  It opens an input file  (-i option)  to receive pnm data.  
  18.     The pnm format and page size is taken from the header.  
  19.  
  20.     If the header does not correspond to a valid pnm format, the rest 
  21.     of the data is rejected, and pnm2ppa terminates.
  22.  
  23.     The input file path is checked to have a length less than
  24.     MAXPATHLEN, as determined at compilation time.
  25.  
  26. 3.  It opens an output file (-o option) to send ppa data  
  27.     (for the printer).
  28.  
  29.     The output file path is checked to have a length less than
  30.     MAXPATHLEN.
  31.  
  32.  
  33. 4.  (unless the --noGamma option is specified) it tries to read color
  34.     correction data from "/etc/pnm2ppa.gamma", or an alternate file with
  35.     a path  specified by the -F command line option.
  36.  
  37.     Such paths are also checked to be shorter than MAXPATHLEN before 
  38.     they are used.
  39.  
  40.     If this data exists, but is not successfully read, pnm2ppa terminates.
  41.     (See COLOR.txt).
  42.  
  43. 5.  pnm2ppa opens and writes to the syslog with informational messages
  44.     about its progress, or, if it terminates, with an error message.
  45.     If it is working in --verbose mode, these messages are also sent
  46.     to stderr.   
  47.  
  48.     No strings derived from user input to pnm2ppa are included in syslog
  49.     messages.  Syslog messages must fit in a  string of length < 128.
  50.     They can be suppressed with a keyword "silent 1" in the default
  51.     system configuration file (/etc/pnm2ppa.conf), but not from
  52.     user-specified config files (from -f option).
  53.  
  54.     All syslog actions by pnm2ppa are "wrapped":  message strings
  55.     produces in the rest of the program are  only sent to the syslog by
  56.     code in syslog.c.  This is also where openlog() and closelog() are 
  57.     called.
  58.  
  59.  
  60. ----------------------------------------------------------------------
  61. Recommendations:
  62.  
  63. --  do *NOT* install pnm2ppa  suid/guid, if is possible that a
  64.     "malicious user" might run it.   The output file specified
  65.     with the -o option could overwrite files to which the user
  66.     has no write permission. 
  67.  
  68.  
  69. --  since pnm2ppa  works as an output filter for gs, it only needs the
  70.     same privileges that gs would need.  If lpr is available, pipe
  71.     the pnm2ppa output though "lpr -l ..." to the appropriate printer
  72.     rather than directly sending it to e.g. /dev/lp0 (in the latter case, 
  73.     write privileges on /dev/lp0 would be needed.)
  74.  
  75. --------------------------------------------------------------
  76.  
  77. Other (optional) programs in the distribution:
  78.  
  79. Do NOT install these suid/gid!
  80.  
  81. calibrate_ppa.c:  
  82.           This is used to produce various ppmraw format PixMap images
  83.               used with pnm2ppa for printer calibration.  Note: these
  84.               PixMaps are LARGE (100MB!!) and should generally be piped 
  85.               directly to pnm2ppa.
  86.  
  87.          THIS SHOULD USUALLY BE INSTALLED.
  88.  
  89. parse_vlink.c 
  90.           a utility useful in debugging pnm2ppa that can interpret
  91.               ppa format output instructions to the printer, whether
  92.               produced by pnm2ppa, or captured from the Windows9x drivers.
  93.               It is in the ppa_protocol subdirectory, and is not compiled
  94.               by default.
  95.  
  96.              THIS IS NOT USUALY INSTALLED.
  97.  
  98.